package com.itheima.controller;

import com.itheima.service.UserService;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @param
 * @return
 */
public class UserController {
    public static void main(String[] args) {
        //创建spring和核心容器对象（IOC）
        ClassPathXmlApplicationContext ac = new ClassPathXmlApplicationContext("spring2.xml");
        UserService userService = ac.getBean("userService", UserService.class);
        userService.findAll();
    }
}
